package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import java.util.List;

import static org.jsola.hr.example.ChannelGroupExample.E_DESCRIBE;
import static org.jsola.hr.example.ChannelGroupExample.E_LEVEL;
import static org.jsola.hr.example.ChannelGroupExample.E_NAME;
import static org.jsola.hr.example.ChannelGroupExample.M_DESCRIBE_MAX;
import static org.jsola.hr.example.ChannelGroupExample.M_NAME_MAX;
import static org.jsola.hr.example.ChannelGroupExample.M_NAME_NOT_NULL;
import static org.jsola.hr.example.ChannelGroupExample.N_DESCRIBE;
import static org.jsola.hr.example.ChannelGroupExample.N_LEVEL;
import static org.jsola.hr.example.ChannelGroupExample.N_NAME;

/**
 * 渠道分组表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【渠道分组表】的参数")
@Data
public class ChannelGroupAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_LEVEL, example = E_LEVEL)
    private Integer level;

    @ApiModelProperty(notes = "用户ID集合")
    private List<String> userIdList;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 30, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_DESCRIBE, example = E_DESCRIBE)
    @Length(max = 150, message = M_DESCRIBE_MAX)
    private String describe;


}

